package com.tom.utils;

/**
 * @author zx
 * @date 2024-11-09 18:01
 */
public class BaseResponse<T>{
    private Integer code;
    private String msg;
    private T data;

    private BaseResponse(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static <T> BaseResponse<T> success(T data) {
        return new BaseResponse<>(0, "success", data);
    }
}
